﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

<head>
<meta http-equiv="Content-Language" content="zh-cn" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ezj.ext.rating - ezj</title>
<link rel="stylesheet" type="text/css" href="css.css" />
</head>

<body>

<div class="section">
  <h1>ezj.ext.rating</h1>
  
  <div class="block">
    <h3>HTML 代码</h3>
    <textarea class="code xhtml">
    <div><span id="rating"></span><span id="result"></span></div>
    </textarea>
    
    <h3>JavaScript 代码（ezj 代码）</h3>
    <textarea class="code javascript">
    ezj.ready(function(){
        ezj.ext.rating(rating, { max : 5 }, function(rating){
            rating.changing(function(obj, v){
                $v(result, "您正在选择的是 " + v + " 分。");
            });
            rating.changed(function(obj, v){
                alert("您选择了 " + v + " 分。", "实际中，将该分通过 ezj.ajax.post 传回服务器，就实现了评级。");
            });
        });
    });
    </textarea>
  </div>
  
  <div class="block">
    <h3>演示</h3>
    <div><span id="rating"></span><span id="result"></span></div>
  </div>
  
  <div class="block footer">
  版权所有 &copy; 2008 - 2010 <a href="http://www.getezj.com/" target="_blank">www.getezj.com</a>
  </div>
</div>

<script type="text/javascript" src="../ezj.js"></script>
<script type="text/javascript">
<!--
ezj.ready(function(){
    ezj.ext.rating(rating, { max : 5 }, function(rating){
        rating.changing(function(obj, v){
            $v(result, "您正在选择的是 " + v + " 分。");
        });
        rating.changed(function(obj, v){
            alert("您选择了 " + v + " 分。", "实际中，将该分通过 ezj.ajax.post 传回服务器，就实现了评级。");
        });
    });
    
    ezj.ext.codelighter(".code");
});
//-->
</script>

</body>

</html>